import 'package:flutter/material.dart';
import 'package:interesting_quiz/quiz/quiz.dart';

class ScorePage extends StatelessWidget {
  ScorePage(this._score, this._quiz);
  final _score;
  Quiz _quiz;
  @override
  Widget build(BuildContext context) {
    return new Material(
      color: Colors.blueAccent[100],
      child: new Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          new Text(
            '你的成绩',
            style: new TextStyle(
                fontSize: 50.0,
                color: Colors.white,
                fontWeight: FontWeight.bold),
          ),
          new Padding(
            padding: const EdgeInsets.only(top: 20.0),
            child: new Text(
              '$_score / ${_quiz.questionLength}',
              style: new TextStyle(fontSize: 40.0, color: Colors.white),
            ),
          ),
          new Padding(
            padding: const EdgeInsets.only(top: 30.0),
            child: new Text(
              _score > 8 ? '你咋这么厉害的呢！' : '还是要多读点书啊!',
              style: new TextStyle(fontSize: 40.0, color: Colors.white),
            ),
          )
        ],
      ),
    );
  }
}
